﻿namespace LocalOverride.Fiddler.Store
{
    public class SpecialCaseMapping
    {
        public string Url { get; set; }
        public string LocalPath { get; set; }


        public bool Equals(SpecialCaseMapping other)
        {
            if (ReferenceEquals(null, other)) return false;
            if (ReferenceEquals(this, other)) return true;
            return Equals(other.Url, Url) && Equals(other.LocalPath, LocalPath);
        }

        public override bool Equals(object obj)
        {
            if (ReferenceEquals(null, obj)) return false;
            if (ReferenceEquals(this, obj)) return true;
            if (obj.GetType() != typeof (SpecialCaseMapping)) return false;
            return Equals((SpecialCaseMapping) obj);
        }

        public override int GetHashCode()
        {
            unchecked
            {
                return ((Url != null ? Url.GetHashCode() : 0)*397) ^ (LocalPath != null ? LocalPath.GetHashCode() : 0);
            }
        }
    }
}